home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 17 / q17.d81 / t.catmeister 128 < prev    next >
Text File  |  2022-08-28  |  3KB  |  62 lines

  1.  
  2.                       Z E R O    P A G E : CATMEISTER 128
  3.  
  4.                                by Fender Tucker
  5.  
  6.  
  7.      This doesn't really deserve to be called CATMEISTER because Jeff Jones'
  8. program of the same name for the 64 mode is much more elegant.  However,
  9. this little BASIC routine is so handy I wanted to pass it around to any
  10. programmer who plans to submit a program to LOADSTAR 128.
  11.  
  12.      Here's what it does.  You have a program that loads and saves files. 
  13. In the old days the program would ask for a filename for you to type in. 
  14. Well, of course, no one can remember a filename, so modern programs give you
  15. a list of relevant files for you to choose from with a highlight bar. 
  16. That's what CATMEISTER 128 does.
  17.  
  18. IMPORTANT!!!  CATMEISTER only works with CONTROL 80, Jon Mattson's superb
  19. BASIC help program from LOADSTAR 128 #10.  I plan to use CONTROL 80 in all
  20. of my 80-column programs and in the words of the editor of LOADSTAR 128, you
  21. should, too.
  22.  
  23.      Run this program and all you'll see is a directory scrolling in a
  24. window in the middle of the screen.  Press the STOP key to stop the
  25. scrolling.  Then move the highlight bar with the CRSR UP/DOWN key.  Then
  26. break out of the program with RUN/STOP-RESTORE so you can list the code.  As
  27. you can see, it's not a big subroutine.
  28.  
  29.      Lines 2, 5 10 and 11 load and set up CONTROL 80.
  30.  
  31.      The trap in line 600 sends the program to line 604 when you press STOP.
  32. If the directory is not longer than the window, then the user doesn't have
  33. to press STOP.  The STOP is only for when the wanted file may scroll out of
  34. the window.
  35.  
  36.      STORE is a CONTROL 80 command that stores the current screen.
  37.  
  38.      The DIRECTORY command may be a selective one.  In HOME REFINANCER I
  39. added ,"hr.*" to the command so it would only display files that began with
  40. an "hr." prefix.
  41.  
  42.      The variables in line 604 are important.  If you use those variables,
  43. you can change the names of these, but not the values.
  44.  
  45.      The BLOCK command is from CONTROL 80 and it's what does the nifty
  46. highlight bars.  I could not live without CONTROL 80.
  47.  
  48.      PEER is a CONTROL 80 command that's the equivalent of BASIC's PEEK
  49. command.  This is not easy to do on the 80-column screen without CONTROL 80.
  50.  
  51.      The file you chose will show up as F$ for loading or whatever in line
  52. 650.  Notice that I have added RUN"HELLO CONNECT" as line 660.  That's for
  53. returning to LOADSTAR; it's not part of the subroutine.
  54.  
  55.      That's it.  Feel free to renumber and use this routine anytime you are
  56. tempted to ask the user to enter a filename for loading or running.  Be sure
  57. your program doesn't use the same variables this routine does.
  58.  
  59. FT
  60.  
  61.                     **** R - Run    RETURN - Menu ****                      
  62.